﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package com.tremormedia.acudeo.ad.enums {
    import flash.utils.*;
    import flash.errors.*;

    public class AdPosition {

        private var _sortValue:int;
        private var _adPosition:String;

        public static const OPEN_SLATE:AdPosition = new AdPosition(EnumRestrictor, "openingslate", 1);
;
        public static const MIDROLL:AdPosition = new AdPosition(EnumRestrictor, "midroll", 3);
;
        public static const PREROLL:AdPosition = new AdPosition(EnumRestrictor, "preroll", 2);
;
        public static const OVERLAY:AdPosition = new AdPosition(EnumRestrictor, "overlay", 3);
;
        public static const END_SLATE:AdPosition = new AdPosition(EnumRestrictor, "endcap", 5);
;
        public static const POSTROLL:AdPosition = new AdPosition(EnumRestrictor, "postroll", 4);
;

        public function AdPosition(_arg1:Class, _arg2:String, _arg3:int){
            if (_arg1 != EnumRestrictor){
                throw (new IllegalOperationError("Invalid constructor access"));
            };
            _adPosition = _arg2;
            _sortValue = _arg3;
        }
        public function isMidPosition():Boolean{
            if ((((this === MIDROLL)) || ((this === OVERLAY)))){
                return (true);
            };
            return (false);
        }
        public function toString():String{
            return (_adPosition);
        }

        public static function compare(_arg1:Object, _arg2:Object, _arg3:Array=null):int{
            var _local4:AdPosition = (_arg1 as AdPosition);
            var _local5:AdPosition = (_arg2 as AdPosition);
            if ((((_local4 == null)) && ((_local5 == null)))){
                return (0);
            };
            if (_local4 == null){
                return (1);
            };
            if (_local5 == null){
                return (-1);
            };
            var _local6:int = (_local4._sortValue - _local5._sortValue);
            if (_local6 > 0){
                return (1);
            };
            if (_local6 < 0){
                return (-1);
            };
            return (0);
        }
        public static function valueOf(_arg1:String):AdPosition{
            var _local3:XML;
            var _local2:XML = describeType(AdPosition);
            for each (_local3 in _local2.constant) {
                if (_arg1 == AdPosition[_local3.@name]){
                    return (AdPosition[_local3.@name]);
                };
            };
            return (new AdPosition(EnumRestrictor, _arg1, -1));
        }

    }
}//package com.tremormedia.acudeo.ad.enums 

class EnumRestrictor {

    private function EnumRestrictor(){
    }
}
